package cn.jslancer.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @author jslancer
 * @date 2017/11/5
 */
@Data
@Document
public class Blog extends Model {
    @Id
    private String id;
    private String title;
    private String content;
    /**
     * 摘要
     */
    private String summary;
    /**
     * 0:公开  1:私密
     */
    private Integer privacy;

    @DBRef
    private Category category;
    @DBRef
    private List<Tag> tags;
}
